﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Model;
using DAL;

namespace BLL
{
    public class BOrder
    {
        private DOrder _dOrder = new DOrder();

        public bool Exists(string phoneNumber)
        {
            return _dOrder.Exists(phoneNumber);
        }
        
        public bool ExistsOrderId(string phoneNumber, string orderId)
        {
            return _dOrder.ExistsOrderId(phoneNumber, orderId);
        }
        public int Add(OrderInfo model)
        {
            return _dOrder.Add(model);
        }
          
        public bool Delete(int id)
        {
            return _dOrder.Delete(id);
        }
         
        public OrderInfo GetModel(int id)
        {
            return _dOrder.GetModel(id);
        }
 
        public DataSet GetList(string strWhere)
        {
            return _dOrder.GetList(strWhere);
        }

        public bool UpdateWhenGetByPlatform(int orderId, int userId)
        {
            return _dOrder.UpdateWhenGetByPlatform(orderId,userId);
        }

        public bool UpdateOneColumns(int orderId, string para, string paraValue)
        {
            return _dOrder.UpdateOneColumns(orderId,para, paraValue);
        }

        public bool UpdateWhenPsgAcceptOrder(string phoneNumber,
         string phoneOrderId, string time)
        {
            return _dOrder.UpdateWhenPsgAcceptOrder(phoneNumber, phoneOrderId, time);
        }

        public bool CancleOrder(string phoneNumber,
                                string phoneOrderId)
        {
            return _dOrder.CancleOrder(phoneNumber, phoneOrderId);
        }

        public bool UpdateWhenPlatformSubmit(OrderInfo order)
          {
              return _dOrder.UpdateWhenPlatformSubmit(order);
          }

        public bool UpdateWhenDriverAcceptOrder(int orderId, string time)
        {
            return _dOrder.UpdateWhenDriverAcceptOrder(orderId, time);
        }

        public bool UpdateWhenPaidAnOrder(string phoneNumber,
         string phoneOrderId, int payType, string payOrderId)
        {
            return _dOrder.UpdateWhenPaidAnOrder(phoneNumber, phoneOrderId,
                payType,payOrderId);
        }
    }
}
